/*
 * gpio_i2c_sht20.h
 *
 *  Created on: Jul 5, 2023
 *      Author: HP
 */

#ifndef INC_GPIO_I2C_H_
#define INC_GPIO_I2C_H_

enum
{
	NO_ERROR		= 0x00,
	PARM_ERROR		= 0x01,
	ACK_ERROR		= 0x02,
	CHECKSUM_ERROR  = 0X04,
	TIMEOUT_ERROR   = 0x08,
	BUS_ERROR		= 0x10,
};

enum
{
	ACK_NONE,
	ACK,
	NAK,

};

extern int I2C_Master_Receive(uint8_t addr,uint8_t *buf, int len);

extern int I2C_Master_Transmit(uint8_t addr, uint8_t *data, int bytes);

extern short sht20_sample_temp_or_hum(uint8_t cmd);




#endif /* INC_GPIO_I2C_H_ */




